///
/// @ProjectName:    learning_rust
/// @Description:
/// @File:           jz1.rs
/// @Author:         wujehy
/// @Email:          wujehy@qq.com
/// @Time:           2021-06-30 21:50
///

struct Solution{

}

impl Solution {
    fn new() -> Self {
        Solution{}
    }

    /**
     * 代码中的类名、方法名、参数名已经指定，请勿修改，直接返回方法规定的值即可
     *
     * @param target int整型
     * @param array int整型二维数组
     * @return bool布尔型
     */
    #[allow(non_snake_case)]
    pub fn Find(&self, target: i32, array: Vec<Vec<i32>>) -> bool {
        // write code here
        for lists in array {
            for item in lists {
                if item == target {
                    return true;
                }
            }
        }
        false
    }
}

#[test]
fn test1(){
    let s = Solution::new();
    let array:Vec<Vec<i32>> = vec![
        vec![1,2,8,9],
        vec! [2,4,9,12],
        vec! [4,7,10,13],
        vec! [6,8,11,15]
    ];
    println!("data : {}" , s.Find(22 , array));
}